Water is vital for all forms of life and access to clean and safe water is essential to human survival1 and continuing progress. In addition to satisfying the needs of the public, water also plays an important role in many sectors of the economy including manufacturing, agriculture, electric power generation and extraction of minerals and energy resources2. As the demand for fresh water increases worldwide, membrane technologies have emerged as cost-effective approaches to utilize lower-quality water sources including brackish water, seawater and recycled wastewater3. Reverse osmosis (RO) is one of leading technologies for removing salts and other soluble contaminants from water4. However, membrane fouling by bacterial biofilms has remained a persistent and unmet challenge for the membrane-based water purification systems1. Bacterial biofilms reduce membrane permeability and salt rejection, and modify membrane module hydrodynamics resulting in excessive pressure drops leading to increased energy consumption5.